package com.briup.day06;

/**
 * @author 谭梦寻
 * @version 1.1
 */
public class TestPerson {
    public static void main(String[] args) {
//        通过调用一个构造方法(构造器)来创建对象
        Person person = new Person();
        person.setAddress("南昌");
        person.setId("12423");
        person.setName("小明");
        System.out.println(person.toString());//等价于person

//        利用有参构造器 创建对象并实例化
        Person person1 = new Person("111", "梦寻", "昆山");
        System.out.println(person1);
//        Person person2 = new Person("阿萨德", "萨达");
        Person GF = new Person("18", "郭枫", "南昌");
        GF.getId();
    }
}
